<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <title>Document</title>
</head>
<body>
  <script>
    for (var i = 1; i <= 5; i++) {
      if (i == 3) {
        continue;    // 跳出本次循环，直接跳到i++
      }
      console.log('我吃完了第' + i +'个苹果');
    }

    for (var i = 1; i <= 5; i++) {
      if (i == 3) {
        break;      // 跳出整个循环
      }
      console.log('我吃完了第' + i +'个苹果');
    }
  </script>
</body>
</html>